package com.zshan.clinic.database.model;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;

/**
 * 就诊人管理
 */
public class CmUserPatient implements Serializable {
    /** 就诊人ID */
    private Long cmPatientId;

    /** 用户ID */
    private Long cmUserId;

    /** 患者ID */
    private Long patientId;

    /** 患者名 */
    private String patientName;

    /** 患者性别;1男生2女生3未知 */
    private String patientGender;

    /** 身份证号 */
    private String idCard;

    /** 年龄年;5代表5岁 */
    private Integer ageYear;

    /** 年龄月;2代表2个月 */
    private Integer ageMonth;

    /** 阳历生日;阳历生日 */
    private LocalDate solarBirthday;

    /** 阴历生日;阴历生日 */
    private LocalDate lunarBirthday;

    /** 诊所ID */
    private Long clinicId;

    /** 默认就诊人 */
    private String isDefault;

    /** 启用状态;启用状态 */
    private String isEnabled;

    /** 删除标识 */
    private String isDelete;

    /** 创建人ID */
    private Long createUserId;

    /** 创建人 */
    private String createBy;

    /** 创建时间 */
    private Date createTime;

    /** 更新人ID */
    private Long updateUserId;

    /** 更新人 */
    private String updateBy;

    /** 更新时间 */
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    public Long getCmPatientId() {
        return cmPatientId;
    }

    public void setCmPatientId(Long cmPatientId) {
        this.cmPatientId = cmPatientId;
    }

    public Long getCmUserId() {
        return cmUserId;
    }

    public void setCmUserId(Long cmUserId) {
        this.cmUserId = cmUserId;
    }

    public Long getPatientId() {
        return patientId;
    }

    public void setPatientId(Long patientId) {
        this.patientId = patientId;
    }

    public String getPatientName() {
        return patientName;
    }

    public void setPatientName(String patientName) {
        this.patientName = patientName == null ? null : patientName.trim();
    }

    public String getPatientGender() {
        return patientGender;
    }

    public void setPatientGender(String patientGender) {
        this.patientGender = patientGender == null ? null : patientGender.trim();
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard == null ? null : idCard.trim();
    }

    public Integer getAgeYear() {
        return ageYear;
    }

    public void setAgeYear(Integer ageYear) {
        this.ageYear = ageYear;
    }

    public Integer getAgeMonth() {
        return ageMonth;
    }

    public void setAgeMonth(Integer ageMonth) {
        this.ageMonth = ageMonth;
    }

    public LocalDate getSolarBirthday() {
        return solarBirthday;
    }

    public void setSolarBirthday(LocalDate solarBirthday) {
        this.solarBirthday = solarBirthday;
    }

    public LocalDate getLunarBirthday() {
        return lunarBirthday;
    }

    public void setLunarBirthday(LocalDate lunarBirthday) {
        this.lunarBirthday = lunarBirthday;
    }

    public Long getClinicId() {
        return clinicId;
    }

    public void setClinicId(Long clinicId) {
        this.clinicId = clinicId;
    }

    public String getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(String isDefault) {
        this.isDefault = isDefault == null ? null : isDefault.trim();
    }

    public String getIsEnabled() {
        return isEnabled;
    }

    public void setIsEnabled(String isEnabled) {
        this.isEnabled = isEnabled == null ? null : isEnabled.trim();
    }

    public String getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(String isDelete) {
        this.isDelete = isDelete == null ? null : isDelete.trim();
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy == null ? null : createBy.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Long updateUserId) {
        this.updateUserId = updateUserId;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy == null ? null : updateBy.trim();
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CmUserPatient other = (CmUserPatient) that;
        return (this.getCmPatientId() == null ? other.getCmPatientId() == null : this.getCmPatientId().equals(other.getCmPatientId()))
            && (this.getCmUserId() == null ? other.getCmUserId() == null : this.getCmUserId().equals(other.getCmUserId()))
            && (this.getPatientId() == null ? other.getPatientId() == null : this.getPatientId().equals(other.getPatientId()))
            && (this.getPatientName() == null ? other.getPatientName() == null : this.getPatientName().equals(other.getPatientName()))
            && (this.getPatientGender() == null ? other.getPatientGender() == null : this.getPatientGender().equals(other.getPatientGender()))
            && (this.getIdCard() == null ? other.getIdCard() == null : this.getIdCard().equals(other.getIdCard()))
            && (this.getAgeYear() == null ? other.getAgeYear() == null : this.getAgeYear().equals(other.getAgeYear()))
            && (this.getAgeMonth() == null ? other.getAgeMonth() == null : this.getAgeMonth().equals(other.getAgeMonth()))
            && (this.getSolarBirthday() == null ? other.getSolarBirthday() == null : this.getSolarBirthday().equals(other.getSolarBirthday()))
            && (this.getLunarBirthday() == null ? other.getLunarBirthday() == null : this.getLunarBirthday().equals(other.getLunarBirthday()))
            && (this.getClinicId() == null ? other.getClinicId() == null : this.getClinicId().equals(other.getClinicId()))
            && (this.getIsDefault() == null ? other.getIsDefault() == null : this.getIsDefault().equals(other.getIsDefault()))
            && (this.getIsEnabled() == null ? other.getIsEnabled() == null : this.getIsEnabled().equals(other.getIsEnabled()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()))
            && (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateUserId() == null ? other.getUpdateUserId() == null : this.getUpdateUserId().equals(other.getUpdateUserId()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCmPatientId() == null) ? 0 : getCmPatientId().hashCode());
        result = prime * result + ((getCmUserId() == null) ? 0 : getCmUserId().hashCode());
        result = prime * result + ((getPatientId() == null) ? 0 : getPatientId().hashCode());
        result = prime * result + ((getPatientName() == null) ? 0 : getPatientName().hashCode());
        result = prime * result + ((getPatientGender() == null) ? 0 : getPatientGender().hashCode());
        result = prime * result + ((getIdCard() == null) ? 0 : getIdCard().hashCode());
        result = prime * result + ((getAgeYear() == null) ? 0 : getAgeYear().hashCode());
        result = prime * result + ((getAgeMonth() == null) ? 0 : getAgeMonth().hashCode());
        result = prime * result + ((getSolarBirthday() == null) ? 0 : getSolarBirthday().hashCode());
        result = prime * result + ((getLunarBirthday() == null) ? 0 : getLunarBirthday().hashCode());
        result = prime * result + ((getClinicId() == null) ? 0 : getClinicId().hashCode());
        result = prime * result + ((getIsDefault() == null) ? 0 : getIsDefault().hashCode());
        result = prime * result + ((getIsEnabled() == null) ? 0 : getIsEnabled().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateUserId() == null) ? 0 : getUpdateUserId().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", cmPatientId=").append(cmPatientId);
        sb.append(", cmUserId=").append(cmUserId);
        sb.append(", patientId=").append(patientId);
        sb.append(", patientName=").append(patientName);
        sb.append(", patientGender=").append(patientGender);
        sb.append(", idCard=").append(idCard);
        sb.append(", ageYear=").append(ageYear);
        sb.append(", ageMonth=").append(ageMonth);
        sb.append(", solarBirthday=").append(solarBirthday);
        sb.append(", lunarBirthday=").append(lunarBirthday);
        sb.append(", clinicId=").append(clinicId);
        sb.append(", isDefault=").append(isDefault);
        sb.append(", isEnabled=").append(isEnabled);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", createUserId=").append(createUserId);
        sb.append(", createBy=").append(createBy);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateUserId=").append(updateUserId);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}